home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 3.4 KB | 127 lines | [TEXT/CWIE] |
- //========================================================================================
- //
- // File: Views.fr
- // Release Version: $ ODF 2 $
- //
- // Contains: Common (Platform independent) resources for the Clock part
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWRESFIL_K
- #include "FWResFil.k"
- #endif
-
- #ifndef FWVIEWS_FR
- #include "FWViews.fr"
- #endif
-
- #ifndef DEFINES_K
- #include "Defines.k"
- #endif
-
- //========================================================================================
- // type RClockView
- //========================================================================================
-
- type RAnalogClockView : FW_RView(Label='ANVW')
- {
- };
-
- //========================================================================================
- // type RClockView
- //========================================================================================
-
- type RDigitalClockView : FW_RView(Label='DGVW')
- {
- };
-
- //========================================================================================
- // Constants
- //========================================================================================
- // Reference size for the Clock frame (will be adjusted at runtime)
- #define H FW_FIX(1000)
- #define H1 H + FW_FIX(1)
-
- #define ZERO FW_FIX(0)
-
- //========================================================================================
- // resource RClockFrame(kClockView)
- //========================================================================================
- // See constants in "FWViews.k", macros & resource types in "FWViews.fr"
-
- resource FW_RFrameLayout(kAnalogClockViewRoot)
- {
- {H,H}, // LayoutSize
- { // Start list of frame's subviews
- RAnalogClockView
- (
- kClockViewID, // View id
- {ZERO, ZERO, H, H}, // Bounds
- FW_kFitToEnclosure // bindings
- ),
- FW_RGrowBox
- (
- kGrowBoxID, // View id
- {H - FW_SBSIZE, H - FW_SBSIZE, H1, H1}, // Bounds
- FW_kGrowBoxBinding // standard grow box binding
- )
- },
- {} // No Scroller
- };
-
- resource FW_RFrameLayout(kDigitalClockViewRoot)
- {
- {H,H}, // LayoutSize
- { // Start list of frame's subviews
- RDigitalClockView
- (
- kClockViewID, // View id
- {ZERO, ZERO, H, H}, // Bounds
- FW_kFitToEnclosure // bindings
- ),
- FW_RGrowBox
- (
- kGrowBoxID, // View id
- {H - FW_SBSIZE, H - FW_SBSIZE, H1, H1}, // Bounds
- FW_kGrowBoxBinding // standard grow box binding
- )
- },
- {} // No Scroller
- };
-
- //-------------------------------------------------------------------------------------
- // Duplicate FW_RFrameLayout resource without GrowBox for non-root frames
- //-------------------------------------------------------------------------------------
- // (See also how the Container sample avoids duplicating resources when there are
- // differences between root and non-root frames)
-
- resource FW_RFrameLayout(kAnalogClockView)
- {
- {H,H}, // LayoutSize
- { // Start list of frame's subviews
- RAnalogClockView
- (
- kClockViewID, // View id
- {ZERO, ZERO, H, H}, // Bounds
- FW_kFitToEnclosure // bindings
- )
- },
- {} // No Scroller
- };
-
- resource FW_RFrameLayout(kDigitalClockView)
- {
- {H,H}, // LayoutSize
- { // Start list of frame's subviews
- RDigitalClockView
- (
- kClockViewID, // View id
- {ZERO, ZERO, H, H}, // Bounds
- FW_kFitToEnclosure // bindings
- )
- },
- {} // No Scroller
- };
-